package flc.ast.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.Bitmap;
import android.os.Bundle;

import java.util.List;

import flc.ast.BaseAc;
import flc.ast.R;
import flc.ast.databinding.ActivityPlantRecResBinding;
import stark.common.apis.base.ImgPlantRet;
import stark.common.basic.event.EventStatProxy;

public class PlantRecResActivity extends BaseAc<ActivityPlantRecResBinding> {

    public static Bitmap sBitmap;
    public static List<ImgPlantRet> sPlantRets;

    @Override
    protected int onCreate() {
        return R.layout.activity_plant_rec_res;
    }

    @Override
    protected void initView() {
        mDataBinding.ivPlantRecResBack.setOnClickListener(v -> onBackPressed());
    }

    @Override
    protected void initData() {
        EventStatProxy.getInstance().statEvent1(this, mDataBinding.event1Container);
        mDataBinding.tvName.setText(sPlantRets.get(0).name);
        mDataBinding.tvDesc.setText(sPlantRets.get(0).baike_info.description);
        mDataBinding.ivPlantRecResImg.setImageBitmap(sBitmap);
    }
}